package weeny.recycle;

import java.awt.geom.Point2D;

import prefuse.visual.EdgeItem;


@Deprecated
public class Pre {
	
	public static Point2D asInteraction(EdgeItem e1, EdgeItem e2){
		throw new UnsupportedOperationException("abandomed");
//		Geom.dumpLine(e1, Geom.asLineA);
//		Geom.dumpLine(e2, Geom.asLineB);
//		int opt = GraphicsLib.intersectLineLine(Geom.asLineA, Geom.asLineB, Geom.asPntA);
//		if (opt < 1) {
//			msg("no intersection (" +
//					Geom.asLineA.relativeCCW(Geom.asPnt(Geom.src(e2)))+","+
//					Geom.asLineB.relativeCCW(Geom.asPnt(Geom.tar(e2)))
//					+"), extend e2..");
//			double ldx = Geom.deltaX(e2);
//			double ldy = Geom.deltaY(e2);
//			Geom.asLineB.setLine(
//					Geom.srcX(e2)-1000*ldx, Geom.srcY(e2)-1000*ldy,
//    				Geom.srcX(e2)+1000*ldx, Geom.srcY(e2)+1000*ldy);
//			opt = GraphicsLib.intersectLineLine(Geom.asLineA, Geom.asLineB, Geom.asPntA);
//			if (opt < 1) {
//				ldx = Geom.deltaX(e1);
//				ldy = Geom.deltaY(e1);
//				msg("no intersection (" +
//						Geom.asLineA.relativeCCW(Geom.asPnt(Geom.src(e2)))+","+
//						Geom.asLineB.relativeCCW(Geom.asPnt(Geom.tar(e2)))
//						+"), extend e1..");
//				Geom.asLineA.setLine(
//						Geom.srcX(e1)-1000*ldx, Geom.srcY(e1)-1000*ldy,
//	    				Geom.srcX(e1)+1000*ldx, Geom.srcY(e1)+1000*ldy);
//				opt = GraphicsLib.intersectLineLine(Geom.asLineA, Geom.asLineB, Geom.asPntA);
//				if (opt < 1) {
//					throw new IllegalStateException("cannot find the intersection");
//				}
//			}
//			msg(".................................fixed");
//		}
//		return Geom.asPntA;
	}
}